/**
 * @Author Puzzle
 * @Date 2022/6/13 11:21 上午
 **/

package model

import (
	"gorm.io/gorm"
	"zsc-boot/core/orm"
)

type ServiceRole struct {
	orm.Model
	Name       string `json:"name" form:"name" gorm:"column:name;comment:名称;"`
	Code       string `json:"code" form:"code" gorm:"column:code;comment:编码"`
	Status     string `json:"status" form:"status" gorm:"column:status;default:正常;comment:状态(启用,禁用);"`
	Remark     string `json:"remark" form:"remark" gorm:"column:remark;comment:备注;type:text;"`
	HideMobile bool   `json:"hideMobile" gorm:"column:hide_mobile;comment:是否隐藏手机号;default:false;"`
}

func (ServiceRole) TableName() string {
	return "service_role"
}

func (ServiceRole) TableComment() string {
	return "角色"
}

type ServiceRoleMenu struct {
	gorm.Model
	RoleCode string `json:"roleCode" form:"roleCode" gorm:"column:role_code;comment:角色编码"`
	MenuCode string `json:"menuCode" form:"menuCode" gorm:"column:menu_code;comment:菜单编码"`
}

func (ServiceRoleMenu) TableName() string {
	return "service_role_menu"
}

func (ServiceRoleMenu) TableComment() string {
	return "角色菜单表"
}
